_ssss_tttt_rrrr_ffff_tttt_iiii_mmmm_eeee, _aaaa_ssss_cccc_ffff_tttt_iiii_mmmm_eeee, and _cccc_ffff_tttt_iiii_mmmm_eeee place characters into the array pointed to
by _ssss as controlled by the string pointed to by _f_o_r_m_a_t. The _f_o_r_m_a_t string
consists of zero or more directives and ordinary characters. All
ordinary characters (including the terminating null character) are copied
unchanged into the array. For _ssss_tttt_rrrr_ffff_tttt_iiii_mmmm_eeee, no more than _m_a_x_s_i_z_e characters
are placed into the array.
If _f_o_r_m_a_t is (char *)0, then the locale's default format is used. For
_ssss_tttt_rrrr_ffff_tttt_iiii_mmmm_eeee the default format is the same as _""""_%%%%_KKKK_CCCC_"""", for _cccc_ffff_tttt_iiii_mmmm_eeee and _aaaa_ssss_cccc_ffff_tttt_iiii_mmmm_eeee
the default format is the same as _""""_%%%%_KKKK_CCCC_"""". _cccc_ffff_tttt_iiii_mmmm_eeee and _aaaa_ssss_cccc_ffff_tttt_iiii_mmmm_eeee first try
to use the value of the environment variable _CCCC_FFFF_TTTT_IIII_MMMM_EEEE, and if that is
undefined or empty, the default format is used.
Each directive is replaced by appropriate characters as described in the
following list. The appropriate characters are determined by the _LLLL_CCCC______TTTT_IIII_MMMM_EEEE
category of the program's locale and by the values contained in the
structure pointed to by _t_i_m_e_p_t_r for _ssss_tttt_rrrr_ffff_tttt_iiii_mmmm_eeee and _aaaa_ssss_cccc_ffff_tttt_iiii_mmmm_eeee, and by the
time represented by _c_l_o_c_k for _cccc_ffff_tttt_iiii_mmmm_eeee.
_%%%%_%%%% same as %
_%%%%_aaaa locale's abbreviated weekday name
_%%%%_AAAA locale's full weekday name
_%%%%_bbbb locale's abbreviated month name
_%%%%_BBBB locale's full month name
_%%%%_cccc locale's appropriate date and time representation
_%%%%_CCCC century number (the year divided by 100 and truncated to an
integer) as a decimal number [00-99]
_%%%%_dddd day of month ( 01 - 31 )
_%%%%_DDDD date as _%%%%_mmmm_////_%%%%_dddd_////_%%%%_yyyy
_%%%%_eeee day of month (1-31; single digits are preceded by a blank)
_%%%%_hhhh locale's abbreviated month name.
_%%%%_HHHH hour ( 00 - 23 )
_%%%%_IIII hour ( 01 - 12 )
_%%%%_jjjj day number of year ( 001 - 366 )
_%%%%_KKKK_CCCC locale's appropriate date and time representation
_%%%%_TTTT time as _%%%%_HHHH_::::_%%%%_MMMM_::::_%%%%_SSSS
_%%%%_UUUU week number of year ( 00 - 53 ), Sunday is the first day of
week 1
_%%%%_wwww weekday number ( 0 - 6 ), Sunday = 0
_%%%%_WWWW week number of year ( 00 - 53 ), Monday is the first day of
week 1
_%%%%_xxxx locale's appropriate date representation
_%%%%_XXXX locale's appropriate time representation
_%%%%_yyyy year within century ( 00 - 99 )
_%%%%_YYYY year as ccyy ( e.g. 1986)
_%%%%_ZZZZ time zone name or no characters if no time zone exists
The difference between _%%%%_UUUU and _%%%%_WWWW lies in which day is counted as the
first of the week. Week number 01 is the first week in January starting
with a Sunday for _%%%%_UUUU or a Monday for _%%%%_WWWW. Week number 00 contains those
days before the first Sunday or Monday in January for _%%%%_UUUU and _%%%%_WWWW,
respectively.
_ssss_tttt_rrrr_ffff_tttt_iiii_mmmm_eeee, _cccc_ffff_tttt_iiii_mmmm_eeee, and _aaaa_ssss_cccc_ffff_tttt_iiii_mmmm_eeee return the number of characters placed
into the array pointed to by _s not including the terminating null
character. (If more than _m_a_x_s_i_z_e characters would have been placed into
the array, _ssss_tttt_rrrr_ffff_tttt_iiii_mmmm_eeee returns zero and the array content is indeterminate.
If _ssss_tttt_rrrr_ffff_tttt_iiii_mmmm_eeee, _cccc_ffff_tttt_iiii_mmmm_eeee, or _aaaa_ssss_cccc_ffff_tttt_iiii_mmmm_eeee overrun the size of the array, the
By default, the output of _ssss_tttt_rrrr_ffff_tttt_iiii_mmmm_eeee, _cccc_ffff_tttt_iiii_mmmm_eeee, and _aaaa_ssss_cccc_ffff_tttt_iiii_mmmm_eeee appear in U.S.
English. The user can request that the output of _ssss_tttt_rrrr_ffff_tttt_iiii_mmmm_eeee, _cccc_ffff_tttt_iiii_mmmm_eeee, or
_aaaa_ssss_cccc_ffff_tttt_iiii_mmmm_eeee be in a specific language by setting the _l_o_c_a_l_e for _c_a_t_e_g_o_r_y
_LLLL_CCCC______TTTT_IIII_MMMM_EEEE in _ssss_eeee_tttt_llll_oooo_cccc_aaaa_llll_eeee.
TTTTiiiimmmmeeeezzzzoooonnnneeee
The timezone is taken from the environment variable _TTTT_ZZZZ [see _cccc_tttt_iiii_mmmm_eeee(3C) for
a description of _TTTT_ZZZZ].
EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS
The example illustrates the use of _ssss_tttt_rrrr_ffff_tttt_iiii_mmmm_eeee. It shows what the string in
_ssss_tttt_rrrr would look like if the structure pointed to by _t_m_p_t_r contains the
values corresponding to Thursday, August 28, 1986 at 12:44:36 in New
_////_uuuu_ssss_rrrr_////_llll_iiii_bbbb_////_llll_oooo_cccc_aaaa_llll_eeee_////_l_o_c_a_l_e_////_LLLL_CCCC______TTTT_IIII_MMMM_EEEE - file containing locale-specific date and
_cccc_ffff_tttt_iiii_mmmm_eeee and _aaaa_ssss_cccc_ffff_tttt_iiii_mmmm_eeee are obsolete. _ssss_tttt_rrrr_ffff_tttt_iiii_mmmm_eeee should be used instead.